# Contributor: Ehud Kaldor <ehud@unfairfunction.org>
# Maintainer: Ehud Kaldor <ehud@unfairfunction.org>
pkgname=liberasurecode
pkgver=1.6.3
pkgrel=1
pkgdesc="Erasure Code API library written in C with pluggable Erasure Code backends"
url="https://github.com/openstack/liberasurecode"
arch="all"
license="BSD-2-Clause"
makedepends="autoconf automake libtool zlib-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/openstack/liberasurecode/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
d5daa962324ef19fd195cfa842ec375d9dd5e62e3391b4a1cbf49a850b852b18cfc9be929ab18786d6b839139f6260d5cb4c88a0ba440c06b0e54e04ffb1bee1  liberasurecode-1.6.3.tar.gz
"
